{extend name="Public:content"}
{block name="content"}
<form id="site_config" action="{:url('admin/config/index')}" method="post" class='form-horizontal'>
    <div class="form-group">
        <label class="col-sm-2 control-label"><span class="nowrap">网站名称</span></label>
        <div class='col-sm-8'>
            <input type="text" name="site_name" required="required" title="请输入网站名称" placeholder="请输入网站名称" value="{:sysconf('site_name')}" class="form-control">
            <p class="help-block">网站名称，显示在浏览器标签上</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">网站logo</label>
        <div class='col-sm-8'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{:sysconf('browser_icon')}"/>
            <input type="hidden" name="browser_icon" onchange="$(this).prev('img').attr('src', this.value)" value="{:sysconf('browser_icon')}" class="form-control">
            <a class="btn btn-link toupload" data-file="one" data-type="ico,png,jpg" data-uptype="local" data-field="browser_icon">上传图片</a>
            <p class="help-block">建议上传ICO图标的尺寸为128x128px，此图标用于网站标题前，ICON在线制作。</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"><span class="nowrap">备案信息</span></label>
        <div class='col-sm-8'>
            <input type="text" name="site_beian" required="required" title="请输入备案信息" placeholder="请输入备案信息" value="{:sysconf('site_beian')}" class="form-control">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"><span class="nowrap">版权信息</span></label>
        <div class='col-sm-8'>
            <input type="text" name="site_copy" required="required" title="请输入版权信息" placeholder="请输入版权信息" value="{:sysconf('site_copy')}" class="form-control">
            <p class="help-block">程序的版权信息设置，在后台登录页面显示</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"><span class="nowrap">程序名称</span></label>
        <div class='col-sm-8'>
            <input type="text" name="app_name" required="required" title="请输入程序名称" placeholder="请输入程序名称" value="{:sysconf('app_name')}" class="form-control">
            <p class="help-block">当前程序名称，在后台主标题上显示</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"><span class="nowrap">程序版本</span></label>
        <div class='col-sm-8'>
            <input type="text" name="app_version" required="required" title="请输入程序版本" placeholder="请输入程序版本" value="{:sysconf('app_version')}" class="form-control">
            <p class="help-block">当前程序版本号，在后台主标题上标显示</p>
        </div>
    </div>
    <!--<div class="form-group">-->
        <!--<label class="col-sm-2 control-label">Baidu <span class="nowrap">(百度统计)</span></label>-->
        <!--<div class='col-sm-8'>-->
            <!--<input type="text" name="tongji_baidu_key" maxlength="32" pattern="^[0-9a-z]{32}$" title="请输入32位百度统计应用ID" placeholder="请输入32位百度统计应用ID" value="{:sysconf('tongji_baidu_key')}" class="form-control">-->
            <!--<p class="help-block">百度统计应用ID，可以在<a target="_blank" href="https://tongji.baidu.com">百度网站统计</a>申请并获取</p>-->
        <!--</div>-->
    <!--</div>-->
    <div class="hr-line-dashed"></div>
    <div class="form-group">
        <div class="col-sm-12 col-sm-offset-2">
            <button class="btn btn-primary">保存配置</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    //表单提交
    $('#site_config').validate({
        submitHandler: function(form){
            $.Oa.doHform('#site_config',false,false,function(res){
                layer.msg(res.msg);
            })
        }
    })
</script>
{/block}